package com.ruoyi.common.config.pay;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

@Component
public class PayAccountConfig {


    //密码
    public static  String PASSWORD;
    public static  String KEYSTORETYPE;
    //证书路劲
    public static  String prikeyFilePath;
    //自定义
    public static  String MerchID ;
    //测试地址
    public static  String SERVER_URL;
    //XIB，银行的公钥内容
    public static  String xibCerContent;
    public PayAccountConfig(@Value("${online}") Boolean onlineFlag){

        if (onlineFlag){
            //密码
            PASSWORD = "Abcd1234";
            KEYSTORETYPE="PKCS12";
            prikeyFilePath="/usr/local/serverCert/online/zhonglianxin/zhonglianxin.pfx";
            //自定义
            MerchID ="";
            //正式
            SERVER_URL = "https://ifsp.xib.com.cn/ifspesi/commonApi/v2/api/YLDF-";
            //正式
            xibCerContent = "MIIE8jCCA9qgAwIBAgIFQCJgJzcwDQYJKoZIhvcNAQELBQAwWDELMAkGA1UEBhMCQ04xMDAuBgNVBAoMJ0NoaW5hIEZpbmFuY2lhbCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTEXMBUGA1UEAwwOQ0ZDQSBBQ1MgT0NBMzEwHhcNMTcwNjE2MDMyMzQxWhcNMjIwNjE2MDMyMzQxWjCBoDELMAkGA1UEBhMCQ04xFzAVBgNVBAoMDkNGQ0EgQUNTIE9DQTMxMRMwEQYDVQQLDApDRkNBIE9DQTMxMRkwFwYDVQQLDBBPcmdhbml6YXRpb25hbC0yMUgwRgYDVQQDDD9DRkNBQOWOpumXqOWbvemZhemTtuihjOiCoeS7veaciemZkOWFrOWPuEBOOTEzNTAwMDA2MTIwMTc3MjdRQDMwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCAJKDeAKEUCVhJv91VATnCZwoGa++3OXXGLCrekqDFVUKGq+wcMrMXKdP2+U19EBIPaWM8oVTzb4laGPBJHoVs6dEO4pl51GctlWeHug4NGK0nvWQtigZ8Uyi+HGF1Zw3WGazyLpvFVpvY4fG9qRro4uA19nTeVWaZxIVZ1Oij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密码
            PASSWORD = "Abcd1234";
            KEYSTORETYPE="PKCS12";
            prikeyFilePath="/usr/local/serverCert/zhonglianxin12.pfx";
            //自定义
            MerchID ="7812021040012";
            //测试地址
//            SERVER_URL = "https://xib03.test.xib.com.cn:21443/ifspesi/commonApi/v2/api/YLDF-"+MerchID+"/";
            SERVER_URL = "https://xib03.test.xib.com.cn:21443/ifspesi/commonApi/v2/api/YLDF-";
            xibCerContent = "MIIDazCCAlOgAwIBAgIJAK5832wV7o2XMA0GCSqGSIb3DQEBCwUAMEwxCzAJBgNVBAYTAkNOMQ8wDQYDVQQIDAZGdUppYW4xDzANBgNVBAcMBlhpYU1lbjEMMAoGA1UECgwDWElCMQ0wCwYDVQQDDARpZnNwMB4XDTE3MDEyMzA4NDkzM1oXDTIwMDEyMzA4NDkzM1owTDELMAkGA1UEBhMCQ04xDzANBgNVBAgMBkZ1SmlhbjEPMA0GA1UEBwwGWGlhTWVuMQwwCgYDVQQKDANYSUIxDTALBgNVBAMMBGlmc3AwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDndP4f+tuaC+66rHtlmTBollIqd96XIMeV76BRHLbbzorpXEb4GylcIJgXCaqEHMzWpfWSVMKykdfr/3JQVzabFRcqoKHxrziW79G/ZouGiB+uj5vOA5gT8uY+D7An9yrPxZdx2s+jMuGDv/lEi/LqZzAqlPatXADinUA9yPrc/FTxR3FSXDqE59X1ooVC+Fartm9kl5HDCxEWmVLjB61oeib1VYOMkrUXW3ODC2rQ+2N96yALWZ//a/mtDocf9fUrpjjvwshdxo7veY93bg3tWSEzsc49VMFxUp1kp3cLu/9OHdW2Z7fK+WD/SV65ZeGBG6EvBsDigyQSyFpxyV7ZAgMBAAGjUDBOMB0GA1UdDgQWBBSvuzuf1P3VdILS14VC5VufHNOuQTAfBgNVHSMEGDAWgBSvuzuf1P3VdILS14VC5VufHNOuQTAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQABP7nOhefVaMxpUM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